<head>
   <script type="text/javascript">
						$(function() {
				$("table")
					.tablesorter({widthFixed: true}) 
					<!--.tablesorter({debug: true})-->
					.tablesorterPager({container: $("#pager1")});
			});
			
    </script>   
    
      
            
</head>
 <div id="pager1" class="pager1">
        <table id="background-image"> 
            <thead> 
            	<?php if(empty($so)){
					?>
                    <tr>
                    	<td colspan="7" align="center">Tidak ada SO</td>
                    </tr>
                    <?php
				}else{?>
                <tr> 
                	<th></th>
                    <th>No Sales Order</th>
                    <th>Perusahaan</th>
                    <th>Nama</th> 
                    <th>Tgl Dibuat</th>               
                    <th>Nama Sales</th>
                    <th>Total</th>
                    <th>Action</th>
                </tr> 
            </thead> 
            <tbody> 
            	
           		<?php $i=0; foreach ($so as $so1){?>
					<tr id="tr_<?php echo $so1['so_no'];?>" >
                <!--onclick="javascript:invoDet(
                        '#invo_<?php echo $so1['so_id'];?>', '#placeResult', 
                        '<?php echo $so1['so_id'];?>', '0')"-->
                        <td><input type="checkbox" name="invoviewcheck[]" id="invoviewcheck[]"  value="<?php echo $so1['so_no']?>"/></td>
                        <td id="td_<?php echo $so1['so_no'];?>"><?php echo $so1['so_no'];?></td> 
                        <td><?php echo $so1['pt_name'];?></td>
                        <td><?php echo $so1['customer_name'];?></td>
                        <td><?php echo $so1['so_date'];?></td>  
                        <td><?php echo $so1['username'];?></td> 
                        <td><?php echo $so1['total'];?></td> 
                        <input type="text" value="<?php echo $so1['total'];?>" id="tagihan_<?php echo  $so1['so_no'];?>" style="display:none" />
                        <input type="text" value="<?php echo $so1['paymethod'];?>" id="method_<?php echo  $so1['so_no'];?>" style="display:none" />
                        <input type="text" value="<?php echo $so1['tglBayar'];?>" id="tanggal_<?php echo  $so1['so_no'];?>" style="display:none" />
                        <input type="text" value="<?php echo $so1['pt_name'];?>" id="perusahaan_<?php echo  $so1['so_no'];?>" style="display:none" />
                        <input type="text" value="<?php echo $so1['duedate'];?>" id="due_<?php echo  $so1['so_no'];?>" style="display:none" />
                        <input type="text" value="<?php echo $so1['bayar'];?>" id="bayar_<?php echo  $so1['so_no'];?>" style="display:none" />
                      
                        
                       
                       
                        <td><a href="<?php echo site_url('so/edit/' . $so1['so_no'])?>">View & Edit</a></td>
                    </tr> 
                    
				<?php $i++;} ?>
           		
       		
           
            </tbody> 
           
            </table> 
    	
                        <div class="success" id="sukses"><?php echo (isset($success))?$success:"";?>&nbsp;</div>

            </form>
            <form>
                <img src="<?php echo base_url();?>img/first.png" class="first" title="back to first"/>
                <img src="<?php echo base_url();?>img/prev.png" class="prev" title="previous"/>
                <input type="text" class="pagedisplay"/>
                <img src="<?php echo base_url();?>img/next.png" class="next" title="next"/>
                <img src="<?php echo base_url();?>img/last.png" class="last" title="go to last"/>
               
                <select class="pagesize">
                    <option selected="selected"  value="10">10</option>
                	<option value="15">15</option>
                    
                </select>
            
        	</form>
            
            </div>
            <?php }?>
    	</div>
       
    </div>      
    
</div>

  <?php /*================================================================*/
		// add payterm
		?>
      
 
